<template>
  <div class="person">
    <h2>姓名：{{ name }}</h2>
    <h2>年龄：{{ age }}</h2>
    <button @click="changeName">修改名字</button>
    <button @click="changeAge">年龄+1</button>
    <button @click="showTel">点我查看联系方式</button>
  </div>
</template>

<script>
export default {
  name: 'Index',
  data() {
    return {
      name: 'zll',
      age: 20,
    }
  },
  components: {},
  computed: {},
  created() {},
  mounted() {},
  methods: {
    changeName() {
      this.name = 'zll2'
    },
    changeAge() {
      this.age += 1
    },
    showTel () {
      alert('18888888888')
    }
  },
}
</script>

<style scoped lang="less"></style>
